Image compression method and apparatus employing distortion adaptive tree search vector quantization

ABSTRACT

A variable rate vector quantization method employs a tree structured codebook. The level of the codebook from which codevectors are selected is determined by a threshold. The threshold varies according to the fullness of a buffer which stores vector quantized data to be transmitted.

RELATED APPLICATION DATA

The subject matter of this application is related to the subject matterof the following co-pending patent applications:

Ser. No. 07/794,589, entitled "Image Compression Method and ApparatusEmploying Tree Search Vector Quantization With Avoidance of Transmissionof Redundant Image Vector Data";

Ser. No. 07/794,491, entitled "Method and Apparatus for TransformingBetween Fixed Rate Vector Quantized Data and Variable Rate VectorQuantized Data"; and,

Ser. No. 07/794,493, entitled "Progressive Transmission of VectorQuantized Data".

1. Field of the Invention

The present invention relates generally to a data compression method andapparatus. More particularly, the present invention relates to a methodand apparatus for compressing image data by an adaptive tree searchvector quantization technique.

2. Background of the Invention

The background of the present invention is described herein in thecontext of pay television systems, such as cable television and directbroadcast satellite (DBS) systems, that distribute program material tosubscribers, but the invention is by no means limited thereto except asexpressly set forth in the accompanying claims.

Cable television operators receive much of their program material fromremote earth stations via a plurality of geosynchronous orbitsatellites. Typically, the cable operator selects the program materialto be made available to its subscribers by making arrangements with thesatellite distributors of that program material. Each cable operatorthen distributes the selected program material to its subscribers, via acoaxial cable distribution system, from its "cable head-end" where thematerial is received from the satellite. Frequently, cable operatorsalso provide their own local programming at the site of the head-end,and further include network broadcasts as well. In DBS applications,each subscriber is capable of receiving a satellite down-link directly.

Typically, in both types of systems (cable and DBS), the programmaterial (comprising both video and audio) is transmitted as analogsignals. Conventional transmission techniques place substantiallimitations on the maximum number of viewer channels that can betransmitted over any given transponder on a satellite since each channelrequires a minimum bandwidth to avoid noticeable degradation and thetotal number of channels that can be transmitted over a given satellitetransponder is limited by the bandwidth of each signal, and of thetransponders. Also, the electrical properties of coaxial cable limit itsbandwidth and therefore place substantial limitations on the number ofchannels that can be delivered to cable television subscribers usingconventional transmission techniques.

There is an interest in the television industry to increase the numberof channels that can be delivered to signal recipients, such as paytelevision subscribers. However, to achieve this goal using conventionaltechniques would require more satellites and/or more transponders. Thereis also an interest in distributing HDTV (high definition television)signals to subscribers, but again, to achieve this goal usingconventional techniques would require that some other programming beeliminated, or that additional satellites be placed in orbit or thatmore transponders be employed, since transmission of HDTV signalsrequires very high bandwidth. However, due to the limited number oflocations in the geosynchronous orbit belt, placing more satellites inorbit is impractical, not to mention expense. Additionally, there is afinite number of transponders that can be placed on each satellite, andtransponder space is at a premium, and rental is expensive. Insofar ascable transmission is concerned, conventional techniques allow expansionof the number of channels that can be transmitted, but only by expensiveupgrading or rebuilding of the cable system.

Digital image transmission techniques have been investigated forovercoming this problem. Digital image transmission offers the advantagethat digital data can be processed at both the transmission andreception ends to improve picture quality. However, the process ofconverting the program material from analog form to digital form resultsin data expansion. Thus, if the digitized program material were to betransmitted in raw digital form, the number of channels that could betransmitted over the satellite, or over the cable, would decrease,rather than increase.

Data compression techniques may be employed to maximize the amount ofdigital information that can be transmitted. Lossless compressiontechniques, such as Huffman encoding and LZW (Lempel, Ziv and Welch)encoding, offer, at best, compression ratios of 2.5 to 1 and do notsufficiently compensate for the amount of data expansion that occurs inconverting data from analog to digital form.

A number of so-called "lossy" compression techniques have beeninvestigated for digital image compression. DCT (discrete cosinetransform) is one known method. Another method, which, until recently,has been used principally for speech compression, is vectorquantization. Vector quantization has shown promise for offering highcompression ratios, and high fidelity image reproduction. It has beendemonstrated that, using vector quantization (hereinafter sometimesreferred to as "VQ"), compression rates as high as 25:1, and even ashigh as 50:1, can be realized without significant visually perceptibledegradation in image reproduction.

Compression of video images by vector quantization involves dividing thepixels of each image frame into smaller blocks of pixels, or sub-images,and defining a "vector" from relevant data (such as intensity and/orcolor) reported by each pixel in the sub-image. The vector (sometimescalled an "image vector") is really nothing more than a matrix of values(intensity and/or color) reported by each pixel in the sub-image. Forexample, a black and white image of a house might be defined by a600×600 pixel image, and a 6×6 square patch of pixels, representing, forexample, a shadow, or part of a roof line against a light background,might form the sub-image from which the vector is constructed. Thevector itself might be defined by a plurality of gray scale valuesrepresenting the intensity reported by each pixel. While a black andwhite image serves as an example here, vectors might also be formed fromred, green, or blue levels from a color image, or from the Y, I and Qcomponents of a color image, or from transform coefficients of an imagesignal.

Numerous methods exist for manipulating the block, or sub-image, to forma vector. R. M. Gray, "Vector Quantization", IEEE ASSP Mag., pp. 4-29(April, 1984), describes formation of vectors for monochrome images. E.B. Hilbert, "Cluster Compression Algorithm: A Joint Clustering/DataCompression Concept", Jet Propulsion Laboratory, Pasadena, Calif., Publ.77-43, describes formation of vectors from the color components ofpixels. A. Gersho and B. Ramamurthi, "Image Coding Using VectorQuantization", Proc. IEEE Int. Conf. Acoust., Speech,. SignalProcessing, pp. 428-431 (May, 1982), describes vector formation from theintensity values of spatially contiguous groups of pixels. All of theforegoing references are incorporated herein by reference.

By way of example, a television camera might generate an analog videosignal in a raster scan format having 600 scan lines per frame. Ananalog to digital converter could then digitize the video signal at asampling rate of 600 samples per scan line. Digital signal processingequipment could then store the digital samples, and group them intovectors.

Before quantizing an image, a vector quantizer stores a set of"codevectors" in a memory called a codebook. Codevectors are vectorswhich are chosen to be representative of commonly found image vectors.For example, one codevector might be a 6×6 pixel solid black patch.Another codevector might have all white pixels in the top three rows,and all black pixels in the bottom three rows. Yet another codevectormight have a gradient made up of white pixels in the top row, blackpixels in the bottom row, and four rows of pixels in between havingshades of gray from light to dark. The quantizer stores a sufficientvariety of codevectors in the codebook so that at least one closelymatches each of the many image vectors that might be found in the fullimage. Typically, a codebook of representative codevectors is generatedusing an iterative clustering algorithm, such as described in S. P.Lloyd, "Least Squares Optimization in PCM", Bell Lab. Tech. Note, (1957)(also found in IEEE Trans. Inform. Theory, Vol. IT-28, pp. 129-137,March, (1982); and, J. T. Tou and R. C. Gonzalez, "Pattern RecognitionPrinciples", pp. 94-109, Addison-Wesley, Reading, Mass. (1974). Both ofthese references are incorporated herein by reference.

Each codevector is assigned a unique identification code, sometimescalled a label. In practice, the identification codes, or labels, arethe memory addresses where the closest codevector to the image vector isfound. (In the appended claims, the term "ID code" is sometimes employedto refer to these labels or addresses,) Compression is achieved byreplacing the codevector in the codebook which most closely matches theimage vector by the label, or memory address.

By way of example, the codevector having the solid black patch describedabove, might be assigned address #1. The codevector having the whitepixels in the top half and black pixels in the bottom half might beassigned address #2, and so on for hundreds or thousands of codevectors.When quantizing a full image, a vector quantizer divides the full imageframe into a series of image vectors. For each image vector, the vectorquantizer identifies one closely matching codevector. The vectorquantizer then generates a new signal made up of the series of labels,or memory addresses where the codevectors were found. For the example ofa full image of a house, the vector quantizer would divide the fullimage into numerous image vectors. The quantizer might then replaceimage vectors from shadowed areas with address #1 (the solid blackpatch), and it might replace the roof line image vectors with address #2(white in the top half and black in the bottom half). Compressionresults because, typically, the length of the labels or addresses ismuch smaller than the size of the codevectors stored in memory.Typically, the addresses are transmitted by any conventional techniqueso that the image can be reconstructed at the receiver.

Reconstruction of the original full image at the receiver (or at least avery close approximation of the original image) may be accomplished by adevice which has a codebook, identical to the codebook at thetransmitter end, stored in a memory. Usually, the device that performsvector quantization and compression at the transmitter is called anencoder, and the device that performs decompression and imagereproduction at the receiving end is called a decoder. The decoderreconstructs (at least an approximation of) the original image byretrieving from the codebook in the decoder the codevectors stored ateach received address. Generally, the reconstructed image differssomewhat from the original image because codevectors do not usuallyprecisely match the image vectors. The difference is called"distortion." Increasing the size of the codebook generally decreasesthe distortion.

Many different techniques for searching a codebook to find thecodevector that best matches the image vector have been proposed, butgenerally the methods can be classified as either a full searchtechnique, or a branching (or tree) search technique. In a full searchtechnique, the vector quantizer sequentially compares an input imagevector to each and every codevector in the codebook. The vectorquantizer computes a measure of distortion for each codevector andselects the one having the smallest distortion. The full searchtechnique ensures selection of the best match, but involves the maximumnumber of computational steps. Thus, while distortion can be minimizedusing a full search technique, it is computationally expensive. Y.Linde, A. Buzo and R. Gray, "An Algorithm For Vector Quantizer Design",IEEE Transactions on Communications. Vol. COM-28, No. 1 (January, 1980),incorporated herein by reference, describes the full search techniqueand the computational steps involved in such a search. The full searchtechnique is sometimes called "full search vector quantization" or "fullsearch VQ".

The tree search technique reduces the number of codevectors that must beevaluated (and thus reduces search time), but generally does notgaurantee that the minimum distortion vector will be selected. A treesearch technique can be considered as one that searches a sequence ofsmall codebooks, instead of one large codebook. The codebook structurecan be depicted as a tree, and each search and decision corresponds toadvancing one level or stage in the tree, starting from the root of thetree. A detailed description of the tree search technique may be foundin R. M. Gray and H. Abut, "Full Search and Tree Searched VectorQuantization of Speech Waveforms," Proc. IEEE Int. Conf. Acoust.,Speech, Signal Processing, pp. 593-96 (May, 1982), and R. M. Gray and Y.Linde, "Vector Quantization and Predictive Quantizers For Gauss MarkovSources", IEEE Trans. Comm., Vol. COM-30, pp. 381-389 (February, 1982),both of which are incorporated herein by reference. The tree searchtechnique is sometimes referred to as "tree-search vector quantization","tree-search VQ" and "TSVQ." The tree-search technique has found favorfor compressing dynamic images, since it is computationally faster.However, since tree search VQ does not gaurantee selection of theoptimum vector, it requires a larger codebook to achieve the samedistortion as full search VQ.

The process of vector quantizing data can be either "fixed rate" or"variable rate." Fixed rate VQ occurs when all of the transmittedaddress data has the same length, and a vector address is transmittedfor all vectors in the image. Generally speaking, variable rate VQoffers the advantage that the average rate at which VQ data istransmitted is less than the rate that would be experienced iftransmission of fixed rate VQ data were employed for the same image atthe same distortion level. In the context of pay television systems,this advantage can be significant, since it can represent a much greaterincrease in the number of channels that can be carried over existingmedia (such as satellite and cable) than would be realized if fixed rateVQ were employed.

Several techniques are available for implementing variable rate VQ. Inone technique, the quantity of compressed data generated by an imagedepends on the image content. For example, a variable rate VQ systemmight employ two different vector sizes. A large vector size might beused to describe simple parts of the image, and a small vector sizemight be used to describe complex parts of the image. The amount ofcompressed data generated depends on the complexity of the image. SungHo and A. Gersho, "Variable Rate Multi-Stage Vector Quantization ForImage Coding", University of California, Santa Barbara (1988) (Availableas IEEE Publ. No. CH 2561-9 88 0000-1156) teach one such technique. Thisreference is incorporated herein by reference. A disadvantage of thistype of variable rate VQ is that the decoder is always more complex thana fixed rate decoder since the decoder requires a video buffer store toreconstruct the image, whereas a fixed rate decoder does not.

Another variable rate VQ scheme is described in E. A. Riskin, "VariableRate Vector Quantization of Images", Ph. D. Dissertation--StanfordUniversity, pp 51 et seq. (May, 1990), incorporated herein by reference.Riskin employs an "unbalanced" tree structured codebook. An "unbalanced"tree structure is simply an incomplete tree; in other words, somebranches of the tree may extend to further levels of the tree than otherbranches. As is common in tree search VQ, Riskin's codebook is searchedby advancing from level to level along selected branches. Encoding willoccur at different levels of the tree (in part due to the unbalancedstructure of the tree), thereby achieving variable rate VQ, since theaddress length is a direct function of the level from which a codevectoris selected. One disadvantage of this system is that encoding is notadaptive in any sense, and therefore the Riskin system does not performvariable rate VQ in a most optimal fashion.

It is therefore desirable to provide a method for implementing variablerate VQ transmission in which the decoder is not significantly morecomplex than a fixed rate decoder. It is also desirable that the methodbe distortion adaptive and not suffer from the shortcomings of Riskintype systems. The present invention achieves these goals.

SUMMARY OF THE INVENTION

A variable rate vector quantization data compression method according tothe present invention comprises the step of first receiving dataindicative of an image to be compressed, and organizing the image datainto blocks. Each block of image data defines a multi-dimensional inputvector. A mean value of the input vector is determined, then the meanvalue is removed from the input vector to obtain a residual vector. Acompression code is assigned to the mean value according to a losslesscompression technique, and the compression code for the mean value isstored in a first-in, first-out (FIFO) buffer.

There is provided, in a memory of the data compressor (encoder), a treesearch vector quantization codebook having plural levels of codevectors.Each codevector is representative of a possible residual vector, andeach successive level of codevectors represents the possible residualvectors in greater detail than a preceding level of codevectors. Amemory address is associated with each codevector, and the addressesincrease in length with each successive level of codevectors. Acompression code is assigned to each possible address. Each compressioncode has a length that is substantially inversely proportional to apredetermined likelihood that an associated codevector will be selected.

A measure of difference between the input vector and the mean value isobtained. The measure of difference is compared to a threshold value,and the following steps are performed only if the measure of differenceexceeds the threshold value:

(1) an initial level of the codebook is selected;

(2) the residual vector is compared to the codevectors at the selectedlevel and the codevector that most closely resembles the residual vectoris selected;

(3) a distortion measure between the selected codevector and theresidual vector is obtained, and the distortion measure is compared tothe threshold value;

(4) the next level of the codebook is selected if the distortion valueexceeds the threshold value; and,

(5) steps 1 through 4 are repeated until either the distortion valuedoes not exceed the threshold value or a last level of the codebook hasbeen reached. Either way, a finally selected codeword is obtained, andthe compression code of its corresponding address is stored in the FIFObuffer.

The process described in the preceding paragraphs is repeated for eachnew input vector while the bits of the compression codes aresequentially transmitted out of the FIFO buffer to receiving locations(decoders) at a fixed data rate. Simultaneously, a measure of unusedFIFO buffer capacity is maintained. The threshold value is periodicallyadjusted based upon the measure of unused FIFO capacity by automaticallyincreasing the threshold value when the measure of unused FIFO capacityindicates that unused capacity is decreasing, and by automaticallydecreasing the threshold value when the measure of unused FIFO buffercapacity indicates that unused FIFO capacity is increasing. Adjustmentof the threshold value ensures that the buffer does not empty oroverflow as a result of storing variable length compression codes buttransmitting the same at a fixed data rate.

In another embodiment of the invention, the threshold value may becalculated in the encoder (or found by trial and error) such that theamount of compressed data generated by a predetermined number of imagesis constant. For example, the threshold value can be set for each imageso that it generates a fixed quantity of compressed data.

According to a preferred embodiment of the invention, the compressioncodes are Huffman codes.

According to the invention, there may be provided at each receivinglocation a decoder apparatus that contains a Huffman decoder forretrieving the transmitted mean value and codevector address from thereceived data. The decoder contains a tree search vector quantizationcodebook that is substantially identical to the codebook at the encoder.The decoder employs each received address to retrieve from its codebookthe codevector residing at the received address to reproduce asubstantial representation of the residual vector. The received meanvalue is added to the reproduced representation of the residual vectorto reproduce a substantial representation of the input vector. At thedecoder, the reproduced representations of the input vectors areemployed to create a substantial representation of each image frame sothat the image may be displayed and/or recorded by a user employing thedecoder. An advantage of this technique is that, aside from the Huffmandecoder, the VQ decoder has substantially the same complexity as a fixedrate decoder.

Other features of the invention will become evident from the followingdrawings and specification.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating an application of the presentinvention to a pay television system employing satellite communicationto transmit program material.

FIG. 2 is a block diagram illustrating another application of theinvention to a pay television system employing cable or direct broadcastsatellite for transmitting program material.

FIG. 3 graphically illustrates the concept of constructing input (image)vectors from pixels of image frames.

FIG. 4 graphically illustrates an image frame as defined by a pluralityof pixels.

FIG. 5 illustrates the organization of an exemplary tree search VQcodebook that may be employed in connection with the practice of thepresent invention.

FIG. 6 illustrates an exemplary memory for storing a codebook.

FIG. 7 is a block diagram of one embodiment of an encoder apparatus forcarrying out the vector quantization compression method of the presentinvention.

FIG. 8 is a flowchart illustrating both the operation of the apparatusof FIG. 7 and one preferred embodiment for carrying out the vectorquantization compression method of the present invention.

FIG. 9 is a flowchart illustrating further details of the operation ofthe apparatus of FIG. 7.

FIG. 10 is a block diagram illustrating further details of the apparatusof FIG. 7 and the method of FIG. 8.

FIG. 11 is a block diagram of one embodiment of a decoder apparatus forcarrying out vector quantization decompression according to the presentinvention.

FIG. 12 is a flowchart illustrating the operation of the apparatus ofFIG. 11.

DETAILED DESCRIPTION OF THE DRAWINGS

Before proceeding to the description of the drawings, it should beunderstood that, although the invention is described herein in thecontext of broadcasting television signals, such as movies and the like,in a pay television system, the present invention is in no way limitedthereto. Rather, the present invention may be employed wherever it isdesired to compress and transmit any type of data, includingconventional (i.e., free) television broadcasts, image data, voice data,etc.

Referring now to the drawings, wherein like numerals indicate likeelements, there is illustrated in FIG. 1 an exemplary application of avector quantization image compression system according to the presentinvention wherein moving image data (e.g., television signals, such asmovies, etc.) is communicated from a point of origin 12 to receivinglocations such as 14 or 16. Typically, the point of origin 12 mightinclude a source 20 of program material that supplies movies, and thelike in analog form to an apparatus (encoder) 22 for digitization anddata compression by vector quantization. Details of apparatus 22 will besupplied hereinafter. Compressed, digitized data is transmitted to asatellite 18, via transmitter 24, for reception by a plurality of earthstations such as 14 or 16. The earth stations 14, 16 may be the head-endof a cable television distribution system of the type which receivessignals from the satellite 18 and distributes them to a plurality ofsubscribers via coaxial cable. Alternatively, as will be explained inconnection with FIG. 2, one or more of the earth stations may be DBS(direct broadcast satellite) subscribers who receive signals directlyfrom the satellite 18. The term "pay television" and "pay televisionsubscriber" is used in the instant specification and accompanying claimsto encompass both cable television and direct broadcast satelliteapplications. However, as mentioned above, the invention is by no meanslimited to pay television systems, but has application to conventional(i.e., free) television transmission and reception.

Returning now to the cable television application of FIG. 1, there isshown two types of cable head end installations 14, 16 that may receivethe down-link from the satellite 18. The cable head-end installation 14may employ the received data in a different manner than the cable headend installation 16, however, the end result (availability of image datafor display or recording) is the same to the cable televisionsubscribers of each system. The two examples of cable head-endinstallations 14, 16 are shown to demonstrate the versatility of thepresent invention.

The cable head-end installation 14 may receive the data transmitted bythe station 12 via receiver 26, then employ an on-site apparatus(decoder) 28 for decompressing the received data and converting the sameback to analog form. Another on-site apparatus 30 may convert the analogdata to conventional NTSC signals for transmission over the cable tosubscribers in conventional form. Thus, in the case of cable head-endinstallation 14, the cable head-end operator distributes analog NTSCcable television signals to subscribers in conventional form.

In the case of the cable head-end installation 16, the data transmittedby station 12 may be received via a receiver/transmitter 34 thatconditions the received data for transmission over the cable system tocable television subscribers. That is, the operator of the cable headend system 16 does not decode or decompress the received data, nor doesit convert the same to analog form. Rather, the operator of the cablehead-end system 16 simply transmits the compressed image data over cabletelevision system for receipt by the subscribers. Subscribers of thesystem 16 must therefore be provided with VQ decoder boxes 36 (describedin detail hereinafter), whereas subscribers to the system 14 may employconventional set-top decoders. The VQ decoder boxes 36, in general,comprise a VQ decoder 38 for decompressing received data and convertingthe same to analog form and an apparatus 40 for converting the analogdata to NTSC format for display on a TV or recording on a VCR. Thedecoder box 36 may be embodied as a set-top decoder, or may be builtinto a television set or VCR.

While subscribers to the system 16 must use the above-described decoderbox 36, an advantage of the system 16 is that, due to the highlycompressed nature of the image data sent over the cable distributionnetwork by the cable operator, many more channels may be transmittedover the cable to subscribers as may be transmitted over the cable inthe system 14. Alternatively, the system 16 enables transmission of HDTVsignals without sacrificing other channel space.

FIG. 2 illustrates another application of the present invention, also toa pay television system. In the system of FIG. 2, block 42 represents acable or DBS head-end. The operator of the head end 42 may insertprogram material 46 (such as network television stations, video tapes,etc.) directly at the locale of the head-end for transmission (viaeither cable or DBS) to the subscribers. Thus, as shown in FIG. 2, thehead-end 42 may include an apparatus (encoder) 48 for digitizing andcompressing the locally provided program material 46, and a transmitter50 for transmitting data from encoder 48 (again, via either cable orsatellite) to each of the subscribers. The encoder 48 may be of the sametype as encoder 22.

Each subscriber to the system of FIG. 2 is equipped with a decoder box44 (that may be identical to the decoder box 36 of FIG. 1) thatcomprises apparatus (decoder) 52 for decompressing received data andconverting the same to analog form. The decoder 44 may also be providedwith apparatus 54 for placing the analog data into NTSC format fordisplay on a television set or for recording via a VCR. As in the caseof decoder box 36, the decoder 44 may be embodied as either a set-topdecoder box, or may be built into a television set or VCR.

FIG. 3 illustrates the concept of converting moving or dynamic images60, such as program material 20 or 46, into input image vectors forvector quantization. The concept illustrated in FIG. 3 is well known.See, for example, R. L. Baker, "Vector Quantization of Digital Images",Ph.D. Dissertation, Stanford University, Department of ElectricalEngineering (1984); Gray, R. M., "Vector Quantization", IEEE ASSP Mag.,Vol. 1, pp. 4,29 (April, 1984); Goldberg, M., Boucher, P. R. and Shlien,S., "Image Compression Using Adaptive Vector Quantization", IEEE Comm.,Vol. COM-34 No. 2 (February, 1986); and, Nasrabadi, N. M. and King, R.A., "Image Coding Using Vector Quantization; A Review", IEEE Comm., Vol.36, No. 8 (August, 1988). As shown in FIG. 3, and as is common in theart, each of the temporally spaced image frames 62a, 62b, 62c, etc.representing the moving image 60 is defined by a plurality of pixels P.In the case of a black and white image, each pixel P reports anintensity value, whereas in the case of a color image, each pixel mayreport luminance and chrominance values, or other values indicative of acolor associated with the pixel.

As mentioned in the background section above, in vector quantization ofan image, e.g., image frame 62a, the pixels P of each image frame aregrouped into blocks that define sub-images of each image frame. Each ofthese blocks, which is a matrix of pixels, defines an input imagevector. Thus, in FIG. 3, a sub-image 64 of image frame 62a isrepresented by the block of pixels P₁₁, P₁₂, . . . P₃₅. This matrix ofpixels defines one input image vector for image frame 62a. Image frame62a, as well as each succeeding image frame 62b, 62c, etc., will usuallybe represented by a plurality of input image vectors.

As graphically shown at 65 of FIG. 3, the intensity and/or color valuesreported by each pixel P are digitized (by the A/D converter shown at 22and 48 of FIGS. 1 and 2). For example, each intensity or color value maybe represented by an 8 bit digital word such that 255 intensity and/orcolor levels are possible for each pixel. Thus, in the case of a blackand white image, only one input vector, containing the intensity valuesreported by each pixel in the block, is required for each block orsub-image. However, in the case of a color image, it may be desirable toprovide several input image vectors for each block or sub-image, e.g.,one input image vector containing intensity data and another containingcolor data. Another possibility is that three input image vectors areprovided for each block in a color image, one containing Y data, anothercontaining I data, and a third containing Q data. According to thevector quantization technique, each of these input image vectors is thencompared to the codevectors stored in the codebook to select a bestmatch codevector for each.

It will be appreciated from the foregoing that, in the case of imagedata, input vectors will usually be multi-dimensional and usually haveat least two dimensions (e.g., the matrix of intensity values shown inFIG. 3). However, there may be instances where input vectors areuni-dimensional, for example, where input vectors are constructed fromthe intensity values of only single rows or columns of pixels. Inputvectors may have more than two dimensions, for example, where inputvectors are constructed from pixel blocks of temporally spaced images(known as three dimensional vector quantization), and/or where data inaddition to intensity data (e.g., color) is included in each vector.

According to the present invention, a tree structured codebook isemployed. FIG. 5 graphically illustrates the structure of an exemplarytree search VQ codebook that may be employed. The construction and useof tree search codebooks to perform vector quantization is well known inthe art. See, for example, the aforementioned article by R. M. Grayentitled "Vector Quantization", and the aforementioned Ph.D.dissertation of R. L. Baker entitled "Vector Quantization of DigitalImages". See also the aforementioned Ph.D. dissertation of E. A. Riskinentitled "Variable Rate Quantization of Images", and, U.S. Pat. No.4,878,230 of Murakami et al. entitled, "Amplitude Adaptive VectorQuantization System." The aforementioned article by Linde, Buzo and Grayentitled "An Algorithm for Vector Quantizer Design" describes onepreferred method for constructing codebooks that may be employed in thepractice of the present invention.

The exemplary tree search VQ codebook of FIG. 5 comprises a plurality oflevels 0-5 of codevectors wherein level 0 is defined by a root node N0of the tree and subsequent levels are defined by additional nodes N1-N62that are reached as branches of the tree are traversed. Each node isactually a codevector, so the exemplary codebook of FIG. 5 has 63codevectors N0-N62. As shown in FIG. 6, the codevectors (CV) are storedin a memory M and each codevector CV has an associated address whichserves as the ID code, or label, discussed in the background sectionabove. As also mentioned in the background section, compression resultsbecause the address length is typically much shorter than the length orsize of each codevector.

As is known to those skilled in the art, in a typical tree search VQcodebook, the codevectors at each successive level of the tree usuallyrepresent possible input vectors with greater accuracy than codevectorsat a preceding level. Thus, the codevectors at level 5 of the exemplarytree of FIG. 5 may represent possible input vectors with greateraccuracy than the codevectors at level 4, and the codevectors at level 4may represent possible input vectors with greater accuracy than thecodevectors stored at level 3, and so on. Such a tree search vectorquantization codebook structure is well known in the art. Additionally,codevectors higher up in the tree (e.g., level 0 and 1) do not requireas long of an address to access as do codevectors lower in the tree(e.g., levels 4 and 5), since there are fewer choices in the upperlevels than in the lower levels, and a longer address length is neededto specify lower levels of the tree in any event. Thus, in the exemplarycodebook of FIG. 5, an address length of 5 bits is required to addressone of the 2⁵ codevectors in level 5, whereas an address length of 3bits is required to address one of the 2³ codevectors in level 3, etc.Thus, the memory addresses have a variable length wherein the length ofthe addresses increases with each successive level of codevectors, andmoreover, the address specifies not only a corresponding codevector, butalso the level in the tree in which that codevector can be found. Itwill therefore be appreciated that, if a search technique were to beimplemented wherein codevectors are selected from different levels ofthe tree, addresses of varying length will be provided, thus enablingvariable rate VQ. The present invention employs such a technique. Forpurposes of the following discussion, and in the drawing, the addressesof some codevectors are indicated in brackets ("[]").

Considering the structure of a tree search codebook in greater detailand referring to the tree search codebook of FIG. 5 as an example, itcan be seen that successive levels of the tree search codebook areformed by branches emanating from each node in a preceding level. Thusfor example, from the root node N0, the first level of the tree searchcodebook of FIG. 5 is formed by the branches to N1 and N2; the secondlevel is formed by the branches from N1 to N3 and N4 and the branchesfrom N2 to N5 and N6. As shown in the FIG., two branches emanate fromeach node at a given level until the bottom level of the tree isreached. It is understood by those skilled in the art that while thetree search codebook of FIG. 5 has two branches emanating from eachnode, other tree search codebooks may be used in accordance with thepresent invention that have more branches emanating from each node.

The address length of each codevector depends upon the number ofbranches emanating from each node as well as the level of the tree atwhich the codevector resides. In typical applications, VQ codebooks arestored in a digital electronic memory wherein the addresses are binary.In general, then, the length of the binary address of a codevector at agiven level (L) can be expressed as:

    Address Length=L(log.sub.2 b) bits,

where b=the number of branches emanating from each node. Thus, forexample, in the tree search codebook of FIG. 5, where there are twobranches emanating from each node, the codevectors of the first level ofthe codebook (residing at N1 and N2) require an address length of only 1bit. The codevectors at each successive level of the tree searchcodebook of FIG. 5 require 1 additional address bit. The 5th level ofthe codebook, therefore, requires 5 address bits. Applying the formulaabove to a tree search codebook having four branches emanating from eachnode, each successive level of codevectors requires two additionaladdress bits. Similarly, in a codebook having eight branches emanatingfrom each node, each successive level of codevectors requires threeadditional address bits, and so on.

With binary addressing, the address of a codevector (node) at a givenlevel of the tree comprises the address of the parent node in thepreceding level plus the number of bits necessary to distinguish thatcodevector from the other codevectors (nodes) having the same parentnode. As described above the number of additional bits depends on thenumber of branches emanating from the parent node and can be expressedas:

    log.sub.2 b bits,

where b=the number of branches emanating from the parent node. Thus, forexample, referring to the tree search codebook of FIG. 5 wherein twobranches emanate from each node, the address of the codevector at N4 is[01] which comprises the address of the codevector at parent node N1([0]) plus an additional bit ([1]) to distinguish the codevector at N4from the codevector at N3 which also has node N1 as a parent. Similarly,for example, the address of the codevector at N9 is [010] whichcomprises the address of the codevector at parent node N4 ([01]) plus anadditional bit ([0]) to distinguish the codevector at N9 from thecodevector at N10 which also has node N4 as a parent.

A result of the structure described above is that from the address of acodevector at a node in a lower level of the tree, the addresses of thecodevectors at the parent nodes in preceding levels can be obtained bysimply truncating the lower level address by log₂ b for each precedinglevel. Thus, for example, knowing the address of the codevector at N41[01010] in the 5th level of the tree search codebook of FIG. 5, theaddress of the codevector at parent node N20 in the preceding 4th levelis obtained simply by truncating the address of the codevector at N41 by1 bit. Thus, the address of the codevector at parent node N20 is [0101](i.e. [01010] with the last bit removed). Similarly, the address of thecodevector at the parent node N4 in the 2nd level of the tree can beobtained by truncating 3 bits (5-2) from the bottom level address. Thus,the address of the codevector at N4 is [01] (i.e. [01010] with the lastthree bits removed).

The number of codevectors in a tree search codebook can be expressedmathematically as:

    ♮ b.sup.L, for L=1 to N

`where N=total number of levels in the codebook;

L=the Lth level of the codebook; and

B=the number of branches emanating from each node of the codebook.

Thus, consider for example a tree search codebook having 10 levels andwherein 4 branches emanate from each node. Applying the formula above,the codebook would contain approximately 1.33 million codevectors.Suppose further, for example, that each codevector is constructed from a3×4 matrix of pixels wherein each pixel represents an intensity valuebetween 0 and 255. Each pixel would require 8 bits or 1 byte of memorystorage, and therefore, each codevector would require 12 bytes of memorystorage (3×4 pixels). Consequently, the codebook would require 16 Mbytesof storage.

In the prior art, vector quantization is commonly (but not always)carried out by searching each input vector all the way through to thebottom of the tree to find the codevector at the bottom of the tree thatmost closely resembles the input vector. According to the presentinvention, and as will be explained in detail below, the maximum levelof the tree to which a search is carried out varies according to avariable threshold. More particularly, the level of the tree to whicheach search is carried out is governed by a measure of distortionbetween each input vector and the best match codevector at a particularlevel, and comparing the distortion measure to the threshold. (Actually,in the preferred embodiment, a residual vector, calculated from theinput vector, is used to search the codebook, but the present inventionis not limited thereto except as expressly set forth in the accompanyingclaims.) If the distortion measure is less than the threshold, thecodevector at that particular level is selected. However, if thedistortion measure is greater than the threshold, then the best matchcodevector at the next level of the tree is selected, and the process isrepeated until the distortion measure is less than the threshold, oruntil the last level of tree has been reached. Further, the thresholdvaries according to a "fullness measure" of a buffer that stores VQ datato be transmitted, which, in effect, causes the threshold to vary as afunction the average length of VQ data stored in the buffer.Alternatively, a threshold value may be derived and fixed for apredetermined number of images which causes those particular images togenerate a fixed amount of compressed data. FIG. 7, which illustrates aVQ encoder apparatus for carrying out this method, and FIGS. 8-10 whichillustrate the method in greater detail, will now be explained.

Referring first to FIG. 7, there is illustrated a VQ encoder apparatus100 for carrying out the method of the present invention. An inputvector (e.g., the digitized matrix 64 of pixel values taken from aportion of the image frame 62a) is received and supplied to a circuit102 which computes the mean value of the input vector. The mean value issupplied on a line 124 to the "-" input of an adder circuit 104 whichalso receives on a "+" input, via line 103, the input vector itself. Themean value is also supplied to a Huffman encoder circuit 120 forpurposes to be described hereinafter. The adder circuit 104 subtractsthe mean value from the input vector to supply, on a line 122, aso-called "residual vector", which is the input vector with its meanvalue removed. As will become evident hereinafter, it is the residualvector that is used for searching the codebook to select a best matchcodevector. This style of vector quantization, known as mean removedvector quantization (MRVQ), is well known in the art and has numerousadvantages. See, for example, the aforementioned article by R. M. Grayentitled "Vector Quantization" and the aforementioned Ph.D. dissertationby R. L. Baker entitled "Vector Quantization of Digital Images".Although the invention is described herein as employing MRVQ, this issimply the preferred embodiment, and the invention is not limited to useof MRVQ, except as may be expressly set forth in the accompanyingclaims. Rather, if desired, the input vector itself, or some othervariant thereof, may be used to carry out the codebook search to selectthe best match codevector (in the claims, the term "processed inputvector" has been employed to cover all such possibilities).

As shown, the mean value is also provided on line 124 to one input of amean value to input vector distortion calculator 106, and the inputvector is also provided on line 103 to another input of calculator 106.The function of the calculator 106 is to calculate a measure ofdifference between the mean value and input vector. This may beperformed by converting the mean value to a vector, then computing ameasure of difference between the mean vector and input vector by anywell known technique, such as by computing the absolute difference ofthe vectors, or by computing the square root of the difference betweenthe squares of the two vectors. Also supplied as an input to thecalculator 106, on line 128, is a threshold value whose magnitude isdetermined as hereinafter described. The calculator 106 determineswhether the difference between the mean value and the input vector isless than or greater than the threshold value. The result of thisdecision is reported, via line 107, to a variable depth controller 108.The controller 108, which functions in accordance with the flowchart ofFIG. 8, is responsible for carrying out vector quantization of eachresidual vector. As will become evident hereinafter, if the differencebetween the mean value and the input vector is less than the threshold,the variable depth controller 108 does not carry out vector quantizationfor this particular input vector. (Alternatively, if the differencebetween the mean value and the input vector is less than the threshold,the input vector could still be vector quantized and the resultdiscarded. This approach offers the advantage that the hardwareimplementation may be simpler.) On the other hand, if the differenceexceeds the threshold, then the controller 108 carries out vectorquantization by conducting a search for the codevector that best matchesthe residual vector.

The residual vector calculated by adder 104 is provided via line 122 toa residual vector buffer 110. Buffer 110 stores the residual vector inthe event that vector quantization is indicated by the output 107 of thecalculator 106. In such case, the residual vector is provided to acodebook processor 112 via line 140. A preferred circuit for thecodebook processor 112 is disclosed in U.S. Pat. No. 5,031,037 entitled"Method and Apparatus for Vector Quantizer Parallel Processing." Thecodebook processor 112 bi-directionally communicates with a treestructured codebook 114 (of the type previously described) via a pair oflines 146. As the codebook 114 is traversed, the residual vector iscompared to the codevectors at each level. The codebook processor 112provides, on a line 142, the address of the best match codevector (e.g.,per FIGS. 5 and 6), and also provides on a line 144, a measure ofdistortion between the current best match codevector and the currentresidual vector. The measure of distortion may be computed in the samemanner as the measure of difference between the mean value and inputvector is carried out. The manner in which this measure of distortion isemployed will become evident hereinafter.

The variable depth controller 108 provides, on a line 126, the addressof a finally selected codevector from the codebook 114. As shown, thisaddress is preferably provided to the input of a Huffman encoder 120. Aspreviously mentioned, the mean value provided by the calculator 102 isalso provided to the Huffman encoder. As will be appreciatedhereinafter, when the measure of difference between the mean value andinput vector calculated by calculator 106 is less than the threshold,then only the mean value is supplied to the Huffman encoder 120, i.e.,vector quantization for this particular input vector is not performedand therefore no address data is provided on line 126 to the Huffmanencoder 120. (Alternatively, when the measure of difference between themean value and input vector calculated by calculator 106 is less thanthe threshold, the input vector could still be vector quantized and theresult discarded. This approach offers the advantage that the harwareimplementation may be simpler.) In such event, the Huffman encoder willinsert a code to indicate to a receiver of VQ data that only the meanvalue, and no address data, has been transmitted for this particularinput vector.

According to one embodiment of the invention, the best match addressprovided on line 142 by the codebook processor 112 for any particularnode of the codebook 114 may be a variable bit length address. In thetree of FIG. 5 which has a root node and 5 subsequent levels, oneadditional bit is needed to address each subsequent level of the tree.If the tree is completely traversed, a 5 bit address will be generated.Alternatively, if the tree is traversed to only the third level, only a3 bit address will be generated. (In one preferred implementation, thereare sixteen branches at each level and four bits are added as each newlevel of the tree is traversed.) It will be understood by those skilledin the art that the tree is traversed by branching only from a selectednode (codevector) at a given level to one of the subsequent nodes(codevector) reachable from the selected node. The controller 108 mayconvey the address of the finally selected codevector on line 126 ineither a fixed rate or variable rate form. Thus, if desired, thecontroller 108 may place the raw address of the finally selectedcodevector on line 126. In such case, the length of the address willvary as the level to which searches are carried out in codebook 114varies, i.e., the data on line 126 will be variable rate. Alternatively,the controller 108 may always convert the address to a fixed lengthaddress so as to provide fixed rate VQ data on line 126.

As mentioned, both the VQ data (addresses) from the controller 108 andthe mean value from calculator 102 are provided to a Huffman encoder120. The Huffman encoder 120, however, is not needed if variable ratedata is provided on line 126 Rather, the variable rate data may beprovided directly to a buffer 118 (for purposes described hereinafter)via line 138. Additionally, it is not absolutely necessary to Huffmanencode the mean values provided by the mean calculator 102. Thus, ifdesired, mean values may also be provided directly to the input of thebuffer 118 via line 136. However, use of the Huffman encoder 120 ispreferred, and it is preferred that the VQ data on line 126 be providedin fixed rate from when the Huffman encoder is employed. If the Huffmanencoder is not employed and the variable rate data is provided directlyto the buffer, then it will also be necessary to provide a means ofenabling the decoder receiving the data to separate the variable ratedata words from each other. One such means is to transmit with each dataword an accompanying code indicative of the length of thereof. (It willbe appreciated that this code will be indicative of the level of thetree from which the final codevector was selected.) Another is to insertstop/start bits. Various other methods may be employed.

Huffman encoders are well known in the art. While many differentvariations of Huffman encoders are known, all operate on essentially thesame principle. A Huffman encoder is a lossless data compressor that,using a lookup table, assigns separable compression codes (addresses)based on the statistical probability that a particular entry in thelookup table will be addressed. That is, the greater the probabilitythat a particular entry in the lookup table will be addressed, theshorter the compression code. Thus, the function of the Huffman encoder120 is to assign compression codes to each address received on line 126,wherein the compression code assigned to each address received on line126 has a length that is inversely proportional to a predeterminedprobability that the codevector associated with that address will befinally selected from the codebook 114. The Huffman encoder 120 alsoassigns compression codes to the mean values from the calculator 102according to the same criteria.

It will be appreciated by those skilled in the art that vectors locatedat higher (i.e., upper) levels of the tree (having shorter addresslengths) typically occur with more frequency than those at lower levels(i.e., closer to the bottom) of the tree although this is notnecessarily always the case. Whatever the wordlength of the variablerate address, the Huffman encoder assigns wordlengths substantiallybased on the frequency of occurence of a particular address (not on itslength). Even in the case of fixed rate addresses, the Huffman encoderchoses variable length codes based on frequency of occurence, andgenerates variable rate data.

Although a Huffman encoder has been shown for compressing the meanvalues and VQ (address) data, any lossless data compressor may beemployed, however, a Huffman encoder is preferred.

The output of the Huffman encoder 120 is provided to the input of afirst in first out (FIFO) buffer 118. If the Huffman encoder 120 is notemployed, then the variable rate VQ data on line 126 may be provideddirectly to the input of the FIFO buffer 118 via line 138 and the meanValue data may be provided as an input via line 136. A clock seriallyclocks in data from the Huffman encoder 120 (or from lines 136, 138)while synchronously transmitting out data stored in the FIFO buffer onoutput 132. The output 132 of FIG. 7 corresponds to the output of blocks22 and 48 of FIGS. 1 and 2.

As previously mentioned, the magnitude of the threshold determineswhether the residual vector will be searched in the codebook. If asearch is called for, then the magnitude of the threshold also affectsthe level in the codebook to which a search is conducted. This thresholdis variable according to a measure of "buffer fullness", or unusedcapacity of the FIFO buffer 118. A measure of buffer fullness isprovided on a line 130 to a threshold adjust circuit 116 which isresponsive to the measure of buffer fullness to increase or decrease themagnitude of the threshold. Accordingly, when the signal on line 130indicates that unused buffer capacity is decreasing (as a result ofincoming VQ data filling the buffer faster than it is being transmittedout), the threshold adjust circuit 116 automatically increases themagnitude of the threshold value. Similarly, when the signal on line 130indicates that unused buffer capacity is increasing (as a result of VQdata being transmitted out faster than new VQ data is filling it), thethreshold adjust circuit 116 automatically decreases the magnitude ofthe threshold value. Co-pending, U.S. patent application Ser. No.365,940, filed Jun. 13, 1985 entitled "Method and Apparatus for DataCompression With Reduced Distortion" discloses another application of acircuit that employs a measure of buffer fullness to adjust a value.

It will be appreciated that increasing the magnitude of the thresholdvalue will increase the measure of difference that will be permittedbetween the mean value and input vector before vector quantization ofthe residual vector is called for. Increasing the magnitude of thethreshold value will also decrease the average level to which searchesare conducted through codebook 114. Decreasing the threshold value willhave an opposite effect. Thus, increasing the threshold value willdecrease the average length of variable rate addresses provided on line126 (when controller 108 is programmed to provide variable rateaddresses thereon), and it will decrease the average length ofcompression codes provided by Huffman encoder 120. Again, decreasing thethreshold will have an opposite effect. It will thus be seen that, asthe buffer 118 begins to approach its maximum capacity, the threshold isadjusted to effectively shorten the length of subsequent input data tothe buffer 118 when variable rate data is provided on line 126, and viceversa. When the Huffman encoder is employed, threshold adjustment willaffect the length of the compression codes as well. Thus, over time, thebuffer will have an average capacity of preferably 50%. Moreimportantly, however, automatic adjustment of the threshold guaranteesthat the buffer will not empty or overflow as a result of storingvariable length data (i.e., either variable length compression codesfrom the Huffman encoder 120, or variable length addresses from thecontroller 108) while transmitting the same on line 132 at a fixed datarate.

The apparatus of FIG. 7 may be employed to implement blocks 22 and 48 ofFIGS. 1 and 2.

FIG. 8 is a flowchart illustrating the operation of the circuit of FIG.7, and particularly the operation of controller 108. As shown, uponreceipt of an input vector, its mean value is calculated as shown atstep 150, then the difference (distortion) between the mean and inputvector is calculated, as shown at step 152. At step 154, the differenceis compared to the threshold value. If the difference is less than thethreshold value, then the mean value is Huffman encoded as shown at step156, and the Huffman code is stored in the buffer 118, as shown at step158. Then, as shown at step 160, the threshold is adjusted based uponthe measure of buffer fullness. At some time, after the Huffman encodedmean value has been clocked through the buffer to the output 138, it istransmitted, as shown at step 162.

If, at step 154, it was determined that the difference between the meanvalue and input vector exceeded the threshold, then vector quantizationis performed upon the residual vector calculated for the current inputvector. Steps 164 through 174 illustrate the manner in which vectorquantization is performed for the residual vector according to thepresent invention. The controller 108 is responsible for carrying outsteps 164 through 174 of FIG. 8.

To perform vector quantization for a new residual vector, the firstlevel of the tree structured codebook 114 is selected, as shown at step164. Next, vector quantization is performed on the residual vector atthis level to find the codevector at this level that most closelyresembles the residual vector. At step 168, a measure of distortion iscalculated between the selected codevector and the residual vector, and,at step 170, this measure of distortion is compared to the threshold. Ifthe measure of distortion exceeds the threshold, then the next level ofthe codebook is selected, as shown at step 172, and, unless the processhas already been performed for the last level of the tree (step 174),steps 166 through 170 are repeated for this next level of the codebook.The loop defined by steps 166 through 174 is repeated, for eachsubsequent level of the codebook, until the measure of distortionbetween the selected codevector and the residual vector is less than thethreshold (step 170), or until the last level of the tree has beencompared (step 174). Step 174 recites "last level+1" to indicate thatthe residual vector is encoded at the last level when the measure ofdistortion always exceeds the threshold, i.e., the loop is not exiteduntil after encoding has been performed at the last level.

When a codevector has been finally selected (at either step 170 or step174), its address, and the mean value associated with the current inputvector, are Huffman encoded, as shown at step 176, and these Huffmancodes are inserted into the buffer 118 as shown at step 178. Thethreshold value is thereafter adjusted as shown at step 180, and, whenthe Huffman codes for the current input vector have been clocked throughthe buffer 118, they are transmitted as shown at step 182.

As shown, the process is repeated for each input vector.

As shown in FIG. 8, in the preferred embodiment, the threshold isadjusted between the receipt of each new input vector. Since an image isgenerally represented by a plurality of input vectors, the method shownin FIG. 8 may adjust the magnitude of the threshold value many times fora single image frame. However, if desired, the threshold value may beadjusted only between image frames. Thus, it may be desired to adjustthe threshold only in-between the time that a last input vector for oneimage frame and a first input vector for a subsequent image frame arereceived.

FIG. 9 illustrates, in flowchart form, how the threshold value isadjusted according to the preferred embodiment of the invention. AsHuffman codes (or variable rate addresses) are inserted into the buffer118 (step 194), and also as serial data is transmitted out of the bufferat a fixed data rate (step 192), the threshold is recalculated as afunction of buffer fullness. As previously mentioned, however, thethreshold value provided to the controller 108 and the calculator 106 isadjusted only in-between receipt of input vectors.

As an alternative, the value of the threshold can be determined for oneor more images. In this case, the value of the threshold is chosen bythe encoder which causes those particular frames to generate therequired fixed amount of data to match the transmission channelcapacity. The value of the threshold can be found by the encoder, forexample, using trial and error or an iterative search technique.

As mentioned, data bits are serially transmitted from the buffer 118.

FIG. 10 graphically illustrates the concept of employing buffer fullnessto adjust the threshold value. As shown, remaining buffer capacityvaries as a function of the length of the variable rate input data(either the Huffman codes or the variable rate addresses), since data istransmitted from the buffer 118 at a fixed data rate. As shown by theline inside the buffer 118 of FIG. 10, the threshold value increasestoward a maximum as unused capacity decreases, and the threshold valuedecreases toward a minimum as unused buffer capacity increases.Theoretical considerations for establishing minimum and maximumthreshold values are:

    ______________________________________                                               Min threshold = 0;                                                            Max threshold = absolute value of [maxpix -                            minpix]* numpix;                                                                     or,                                                                           Max threshold = [maxpix - minpix].sup.2 * numpix;                             where:                                                                              maxpix = maximum grey level of pixels;                                        minpix = minimum grey level of pixels;                                        numpix = block (sub-image) size                                  ______________________________________                                    

However, in practice, max threshold can be set to a value smaller thanthe theoretical maximum since the theoretical value is not likely toever occur. This ensures better buffer utilization without requiring anexcessively large buffer.

Referring now to FIG. 11, there is shown a block diagram of an apparatus(decoder) for receiving VQ data transmitted by the buffer 118 andconverting the same back to image data. The apparatus of FIG. 11 may beemployed to implement blocks 28, 38 and 52 of FIGS. 1 and 2.

As shown, a Huffman decoder 206 receives and decodes the received datato obtain the transmitted address and mean value. These are stored,preferably on a per frame basis, in a buffer 206. In one preferredimplementation, these data are stored for both the complete currentframe and the complete immediately preceding frame so that interpolatedmean values can be computed. A discriminator circuit 208 retrieves theobtained address and provides it on a line 216 to a codebook processor210 that may be identical to the codebook processor 112 of FIG. 7. Theapparatus 200 of FIG. 11 is also provided with a tree structuredcodebook 212 which is identical to the tree structured codebook 114 ofthe encoder apparatus 100 of FIG. 7. The address on line 216 provided bythe discriminator circuit 208 is employed by the codebook processor toretrieve the identical codevector which was found to be the best matchby the encoder 100 of FIG. 7. This codevector, which represents aresidual codevector, is supplied on a line 218, to the input of asumming circuit 216. The discriminator 208 supplies the mean value toanother input of the summer 216 via line 220. The summer adds the meanvalue to the residual codevector to supply, on line 222, a reproducedcodevector which is a substantial representation, in the form of adigital value, of the corresponding input vector processed by theencoder 100 of FIG. 7. Each digital value is then converted to analogform and NTSC encoded and supplied to the input of a TV or VCR ashereinbefore described.

FIG. 12 is a flowchart illustrating the operation of the circuit of FIG.11. As shown, each received Huffman code is decoded by circuit 204, asshown at step 230. The mean value is retrieved, step 232, then, at step234, a determination is made as to whether the codebook address of acorresponding residual vector was transmitted with this mean value. Aspreviously mentioned, this may be determined by appending a code to themean value at the encoder when its transmission is not accompanied by acodebook address (the Huffman encoder will do this automatically). If,at step 234, it was determined that a codebook address did not accompanythis mean value, then, as shown at step 236, the vector is reproducedsolely from the mean value.

If, at step 234, it was determined that a codebook address did accompanythe transmission of the mean value, then that codebook address isretrieved as shown at step 240. Then, as shown at step 242, the residualcodevector residing at this address in the codebook 212 of the decoder200 is retrieved. As shown at 244, a vector is reproduced by adding themean value back to the residual codevector. When an image vector hasbeen received, its digital values are converted to analog form (step246) and NTSC encoded at step 248. Thereafter, the NTSC image data maybe displayed on a TV, or recorded on a VCR, as desired.

In FIGS. 11 and 12, the reproduced image vector is shown as beingsupplied directly to the D/A converter 218. However, this illustrationis simplified and is for purposes of expediency only. Those skilled inthe art will readily appreciate that a full scan line will need to beobtained, i.e., from several sequential image vectors, for the NTSCencoder to trace a line of the image on the display or recording device.This may be performed by employing a small buffer to store thosesequential image vectors needed to construct a scan line. An alternativemethod of retrieving a scan line is disclosed in co-pending patentapplication Ser. No. 07/794,487, entitled "Method and Apparatus For LowFrequency Removal in Vector Quantization."

The invention has been described above as being carried out in thespatial domain, i.e., the codevectors stored in the codebook arerepresentative of the spatial placement of the pixels in each sub-image,and the input vectors used to search the codebook are representative ofthe spatial placement of an actual group of pixels. However, theinvention is not limited to implementation in the spatial domain. Theinvention may also be carried out in the transform, or frequency, domainwherein, instead of storing spatial codevectors as above described,their transforms are calculated and transformed codevectors are storedin the codebook. For example, each codevector would be replaced by itscosine (Fourier) transform, and each input vector would be transformedprior to searching the codebook. In this case, the codebook would stillbe constructed as described in the above mentioned Linde et al.reference, but entries would be based upon a distance metric (e.g., meansquare error) in the transformed vector space. Thus, in the encoder, thetree search would be carried out in the transform domain. However, thedecoder could remain unchanged. The decoder codebook could continue tooperate in the spatial domain. The advantage of this approach is that itis believed that it would result in fewer "block" artifacts commonlyfound in VQ encoder/decoder schemes.

The present invention may be employed in other specific forms withoutdeparting from the spirit or essential attributes thereof and,accordingly, reference should be made to the appended claims rather thanto the foregoing specification, as indicating the scope of theinvention.

We claim:
 1. In a vector quantization data compression system employinga tree search vector quantization codebook having plural levels ofcodevectors representative of possible input vectors to be processed bythe system, each input vector being indicative of a block of data to becompressed, each codevector having an associated identification (ID)code, a method comprising the steps of:a) receiving an input vector anddetermining a mean value of the received input vector; b) transmittingdata indicative of the mean value; c) determining a difference valueindicative of a difference between the input vector and the mean value,and comparing the difference value to a threshold value; d) performingthe following additional steps when the difference value exceeds thethreshold value:(i) selecting a codevector from the codebook based upona processed version of the input vector and the threshold value; and,ii) transmitting data indicative of the ID code associated with theselected codevector.
 2. Method according to claim 1 wherein thecodevectors are stored in a memory and each ID code is a memory address.3. Method according to claim 2 wherein the addresses have a variablelength that increases with each level of codevectors and wherein, onaverage, the length of the addresses is shorter than a length of thecodevectors, and step (d)(ii) comprises transmitting the variable lengthaddress.
 4. Method according to claim 2 wherein a compression code isassigned to each possible address, each compression code having a lengththat is substantially inversely proportional to a predeterminedprobability that a particular codevector will be selected in step(d)(i), and step (d)(ii) comprises transmitting the compression code forthe address associated with the selected codevector.
 5. Method accordingto claim 1 further comprising the step of periodically adjusting thethreshold value based upon an average length of data transmitted insteps (b) and (d)(ii).
 6. Method according to claim 3 or 4 wherein thedata to be transmitted is temporarily stored then transmitted at asubstantially fixed data rate.
 7. Method according to claim 1 whereinthe system receives input data to be compressed and the input data isrepresentative of a moving image.
 8. Method according to claim 1wherein, prior to performing step (d), the mean value is removed fromthe input vector to obtain a residual vector, and the residual vector isemployed to select the codevector in step (d)(i), the residual vectorbeing the said processed version of the input vector.
 9. Methodaccording to claim 8 wherein step (d)(i) comprises:a') selecting aninitial level of the codebook; b') selecting the codevector at theselected level that most closely resembles the residual vector; c')obtaining a measure of difference, if any, between the selectedcodevector and the residual vector; d') proceeding to step (d)(ii) onlyif the measure of difference is less than the threshold value, butotherwise selecting a next level of the codebook and repeating steps(b') and (c') until either the measure of difference is less than thethreshold value or a last level of the codebook has been employed, thenproceeding to step (d)(ii).
 10. Method according to claim 4 wherein thecompression codes are Huffman codes.
 11. In a tree search, variable ratevector quantization data compression system of the type that converts ablock of input data to a multi-dimensional input vector, and having acodebook with plural levels of codevectors, each codevector beingrepresentative of a possible input vector for converting each inputvector to an identification (ID) code associated with each codevector,the codevectors at each successive level representing possible inputvectors with greater accuracy than codevectors at a preceding level, amethod comprising the steps of:a) processing the input vector andselecting an initial level of the codebook; b) comparing the processedvector to the codevectors at the selected level of the codebook andselecting the codevector that most closely resembles the processedvector; c) obtaining a measure of difference, if any, between theprocessed vector and the selected codevector; d) transmitting anindication of the ID code associated with the selected codevector onlyif the measure of difference is less than a threshold value, butotherwise selecting a next level of the codebook and repeating steps (b)and (c) until either the measure of difference is less than thethreshold value or a last level of the codebook is reached, thentransmitting the indication, each ID code having a length that, onaverage, is shorter than a length of its associated codevector. 12.Method according to claim 11 wherein step (a) comprises determining amean value of each input vector and removing the mean value from theinput vector to obtain a residual vector, the processed vectorcomprising the residual vector.
 13. Method according to claim 11 whereinthe codebook is stored in a memory and each ID code is a memory addressand the memory addresses have a variable length wherein the lengthincreases with each successive level of codevectors, the transmittedindication identifying the variable length address of a finally selectedcodevector and the level of the finally selected codevector.
 14. Methodaccording to claim 11 wherein the codebook is stored in a memory andeach ID code is a memory address, and a compression code is assigned toeach possible address, each compression code having a length that issubstantially inversely proportional to a predetermined probability thata particular codevector will be finally selected, the transmittedindication comprising the compression code for the address associatedwith the finally selected codevector.
 15. Method according to claim 14wherein the compression codes are Huffman codes.
 16. Method according toclaim 13 or 14 further comprising the step of automatically adjustingthe threshold based upon a measure of average length of previouslytransmitted indications.
 17. Method according to claim 13 or 14 whereinthe indications are transmitted at a fixed data rate, further comprisingthe steps of storing indications to be transmitted in a buffer,periodically obtaining a measure of unused capacity of the buffer, andautomatically adjusting the threshold value based upon the measure ofunused buffer capacity.
 18. Method according to claim 12 wherein thefollowing steps (i) and (ii) are performed prior to performing steps(b)-(d):i) obtaining a measure of difference between the mean value andthe input vector; and, ii) comparing the measure of difference from step(i) to the threshold value; and wherein steps (b)-(d) are performed onlyif the result of the comparison of step (ii) indicates that the measureof difference from step (i) is greater than the threshold value; andfurther comprising the step of always transmitting an indication of themean value of each received input vector.
 19. Method according to claim18 further comprising the step of compressing both the ID codeassociated with the finally selected codevector and the mean valueaccording to a lossless compression technique, the transmittedindication comprising both the compressed ID code and the compressedmean value.
 20. Method according to claim 19 wherein the compressiontechnique is a Huffman encoding technique.
 21. Method according to claim11 wherein the input data comprises image frames representing movingimages to be displayed on a television set, each image frame comprisinga matrix of pixels and each pixel within each image frame having atleast an associated intensity value, and at least ones of the inputvectors are representative of the intensity values of a block of pixelsin the image.
 22. Method according to claim 11 wherein the input datacomprises image frames representing moving images to be displayed on atelevision set, each image frame comprising a matrix of pixels and eachpixel within each image frame having at least associated luminance andchrominance values, and at least ones of the input vectors arerepresentative of the luminance and chrominance values of a block ofpixels in the image.
 23. Method according to claim 16 wherein the inputdata comprises temporally spaced image frames representing a movingimage and the threshold is adjusted only between image frames. 24.Method according to claim 17 wherein the input data comprises temporallyspaced image frames representing a moving image and the threshold isadjusted only between image frames.
 25. Method according to claim 16wherein the input data comprises temporally spaced image framesrepresenting a moving image and the threshold is periodically adjustedwithin image frames.
 26. Method according to claim 17 wherein the inputdata comprises temporally spaced image frames representing a movingimage and the threshold is periodically adjusted within image frames.27. Method according to claim 21 further comprising the stepsof:providing another substantially identical tree search vectorquantization codebook at a locale of the television set; receiving eachtransmitted indication at the locale of the television set, obtainingthe ID code therefrom, and retrieving from the codebook at the locale ofthe television set the codevector associated with the obtained ID codeto reproduce at least a substantial representation of the finallyselected codevector; employing each reproduced finally selectedcodevector to substantially re-create each image frame at the locale ofthe television set and display each re-created image frame on thetelevision set.
 28. Method according to claim 27 wherein the data istransmitted via satellite to a reception site then retransmitted at thereception site over a cable television distribution network to aplurality of cable television subscribers.
 29. Method according to claim27 wherein the data is transmitted via satellite directly to a receptionsite comprising one of a free television broadcast recipient, a cablehead end, a reception location of a cable television distributionsystem, or a pay television subscriber.
 30. Method according to claim 21wherein the data is transmitted via satellite to a reception site andthe following steps are performed at the reception site:providinganother substantially identical tree search vector quantization codebookat a locale of the reception site; receiving each transmitted indicationat the locale of the reception site, obtaining the ID code therefrom,and retrieving from the codebook at the locale of the reception site thecodevector associated with the obtained ID code to reproduce at least asubstantial representation of the finally selected codevector; employingeach reproduced finally selected codevector to substantially re-createeach image frame at the locale of the reception site and encoding datafor each re-created image frame in NTSC format; transmitting the NTSCencoded data from the reception site to a plurality of cable televisionsubscribers over a cable television distribution network.
 31. In a datacompression system of the type converting input data tomulti-dimensional input vectors each representing a block of data, amethod comprising:a) determining a mean value of each input vector and,transmitting data indicative of the mean value; b) providing, in amemory, a tree-search vector quantization codebook having plural levelsof codevectors, there being a residual vector defined by each inputvector, each codevector being representative of a possible residualvector and each successive level of codevectors representing possibleresidual vectors with greater accuracy than a preceding level ofcodevectors, there being a memory address associated with eachcodevector; c) obtaining a measure of difference between the mean valueand the input vector and comparing the measure of difference to athreshold value and performing the following additional steps only ifthe measure of difference exceeds the threshold value; d) removing themean value from the vector to obtain the residual vector defined by theinput vector and selecting an initial level in the codebook; e)comparing the residual vector to the codevectors at the selected leveland selecting the codevector at the selected level that most closelyresembles the residual vector; f) calculating a distortion valuerepresentative of a difference, if any, between the selected codevectorand the residual vector, and comparing the distortion value to thethreshold value; g) selecting the next level in the codebook if thedistortion value exceeds the threshold value and repeating steps (e) and(f) until either (1) the distortion value does not exceed the thresholdvalue, or (2) a last level of the codebook has been reached, to obtain afinally selected codevector; and, h) transmitting an indication of atleast the address associated with the finally selected codevector, eachtransmitted indication having a length that is on average shorter than alength of the finally selected codevector.
 32. Method according to claim31 wherein the addresses have variable length that increases with eachsuccessive level of codevectors, the transmitted indication identifyingboth the variable length address and level of the finally selectedcodevector.
 33. Method according to claim 31 wherein step (h) comprisescompressing the address associated with the finally selected codevectoraccording to a lossless compression technique then transmitting thecompressed address, the transmitted indication comprising the compressedaddress.
 34. Method according to claim 33 wherein the address iscompressed according to a Huffman encoding technique.
 35. Methodaccording to claim 31 wherein step (a) comprises compressing the meanvalue according to a lossless compression technique then transmittingthe compressed mean value, the transmitted data indicative of the meanvalue comprising the compressed mean value.
 36. Method according toclaim 31 wherein both the address associated with the finally selectedcodevector and the mean value are compressed according to a losslesscompression technique, and step (a) comprises transmitting thecompressed mean value and step (g) comprises transmitting the compressedaddress.
 37. Method according to claim 35 wherein the mean value iscompressed according to a Huffman encoding technique.
 38. Methodaccording to claim 31 wherein, prior to performing step (h), acompression code is assigned to each possible address, each compressioncode having a length that is substantially inversely proportional to apredetermined probability that a particular codevector will be finallyselected, the transmitted indication comprising the compression code forthe address associated with the finally selected codevector.
 39. Methodaccording to claim 38 wherein the compression codes are Huffman codes.40. Method according to claim 31, 32 or 38 wherein the indications aretransmitted at a substantially fixed data rate.
 41. Method according toclaim 40 further comprising the step of storing indications to betransmitted in a buffer, periodically obtaining a measure of unusedcapacity of the buffer, and periodically and automatically adjusting thethreshold value based upon the measure of unused capacity of the buffer.42. Method according to claim 41 wherein the threshold value is adjustedby increasing the threshold value when the measure indicates that unusedbuffer capacity is decreasing and decreasing the threshold value whenthe measure indicates that unused buffer capacity is increasing,adjustment of the threshold value ensuring that the buffer does notempty or overflow.
 43. Method according to claim 31 wherein the inputdata comprises image frames representing moving images to be displayedon a television set, each image frame comprising a matrix of pixels andeach pixel within each image frame having at least an associatedintensity value, and at least ones of the input vectors arerepresentative of the intensity values of a block of pixels in theimage.
 44. Method according to claim 31 wherein the input data comprisesimage frames representing moving images to be displayed on a televisionset, each image frame comprising a matrix of pixels and each pixelwithin each image frame having at least associated luminance andchrominance values, and at least ones of the input vectors arerepresentative of the luminance and chrominance values of a block ofpixels in the image.
 45. Method according to claim 31 wherein the inputdata comprises temporally spaced image frames representing a movingimage and the threshold is adjusted only between image frames. 46.Method according to claim 41 wherein the input data comprises temporallyspaced image frames representing a moving image and the threshold isadjusted only between image frames.
 47. Method according to claim 41wherein the input data comprises temporally spaced image framesrepresenting a moving image and the threshold is periodically adjustedwithin image frames.
 48. Method according to claim 43 further comprisingthe steps of:providing another substantially identical tree searchvector quantization codebook at a locale of the television set;receiving each transmitted indication at the locale of the televisionset, obtaining the address therefrom, and retrieving from the codebookat the locale of the television set the codevector residing at theobtained address to reproduce at least a substantial representation ofthe finally selected codevector; employing each reproduced finallyselected codevector to substantially re-create each image frame at thelocale of the television set and display each recreated image frame onthe television set.
 49. Method according to claim 48 wherein the data istransmitted via satellite to a reception site then retransmitted at thereception site over a cable television distribution network to aplurality of cable television subscribers.
 50. Method according to claim48 wherein the data is transmitted via satellite directly to a paytelevision subscriber.
 51. Method according to claim 43 wherein the datais transmitted via satellite to a reception site and the following stepsare performed at the reception site:providing another substantiallyidentical tree search vector quantization codebook at a locale of thereception site; receiving each transmitted indication at the locale ofthe reception site, obtaining the address therefrom, and retrieving fromthe codebook at the locale of the reception site the codevectorassociated with the obtained address to reproduce at least a substantialrepresentation of the finally selected codevector; employing eachreproduced finally selected codevector to substantially re-create eachimage frame at the locale of the reception site and encoding data foreach re-created image frame in NTSC format; transmitting the NTSCencoded data from the reception site to a plurality of cable televisionsubscribers over a cable television distribution network.
 52. Variablerate vector quantization data compression method comprising the stepsof:a) receiving data indicative of an image to be compressed, organizingthe image data into blocks, and converting each block to amulti-dimensional input vector; b) determining a mean value of the inputvector; c) assigning a compression code to the mean value according to alossless compression technique and storing the compression code in afirst-in first-out (FIFO) buffer; d) providing, in a memory, atree-search vector quantization codebook having plural levels ofcodevectors, there being a residual vector defined by each input vector,each codevector being representative of a possible residual vector andeach successive level of codevectors representing the possible residualvectors in greater detail than a preceding level of codevectors, therebeing a memory address associated with each codevector; e) assigning acompression code to each possible address, each compression code havinga length that is substantially inversely proportional to a predeterminedlikelihood that the codevector associated with the address correspondingto the compression code will be selected; f) obtaining a measure ofdifference between the input vector and the mean value and comparing themeasure of difference to a threshold value and performing steps (f1)through (f5) below only if the measure of difference exceeds thethreshold value;f1) removing the mean value from the input vector toobtain the residual vector defined by the input vector and selecting aninitial level in the codebook; f2) comparing the residual vector to thecodevectors at the selected level and selecting the codevector that mostclosely resembles the residual vector; f3) obtaining a measure ofdifference, if any, between the selected codevector and the residualvector, and comparing the measure of difference between the selectedcodevector and the residual vector to the threshold value; f4) selectingthe next level in the codebook if the measure of difference obtained instep (f3) exceeds the threshold value; f5) repeating steps (f1) through(f4) until either (1) the measure of difference does not exceed thethreshold value, or (2) a last level of the codebook has been reached,to obtain a finally selected codevector and storing the compression codefor the address of the finally selected codevector in the FIFO buffer;g) repeating steps (b) through (f) for each new input vector whilesequentially transmitting each compression code stored in the FIFObuffer at a fixed data rate; and, h) maintaining a measure of unusedFIFO buffer capacity and periodically adjusting the threshold value byautomatically increasing the threshold value when the measure of unusedFIFO buffer capacity indicates that unused capacity is decreasing andautomatically decreasing the threshold value when the measure of unusedFIFO buffer capacity indicates that unused capacity is increasing,adjustment of the threshold value ensuring that the buffer does notempty or overflow as a result of storing variable length compressioncodes but transmitting the same at a fixed data rate.
 53. Methodaccording to claim 52 wherein the compression codes are Huffman codes.54. Method according to claim 52 wherein the image is represented by amatrix of pixels each having at least an intensity value and thereceived data is digital data indicative of at least the intensity valueof each pixel, and further wherein at least ones of the input vectorscomprise digital intensity data for a rectangular block of pixels. 55.Method according to claim 52 wherein the image is represented by amatrix of pixels in an image frame and the images are color images, eachpixel within each image frame having at least associated luminance andchrominance values, at least ones of the input vectors beingrepresentative of the luminance and chrominance values of a block ofpixels in the image.
 56. Method according to claim 52 wherein the imageis a moving image represented by sequential image frames and dataindicative of sequential frames is captured in frame buffers, and thereceived data corresponds to data stored in each frame buffer, andwherein the threshold value is adjusted only between receipt of the datafor each sequential frame.
 57. Method according to claim 54 wherein theindications are transmitted to a cable television subscriber furthercomprising the steps of:providing another substantially identical treesearch vector quantization codebook at a locale of the cable televisionsubscriber; receiving each transmitted indication at the locale of thecable television subscriber, obtaining the address therefrom, andretrieving from the codebook at the locale of the cable televisionsubscriber the codevector residing at the obtained address to reproduceat least a substantial representation of the finally selectedcodevector; employing each reproduced finally selected codevector tosubstantially re-create each image frame at the locale of the cabletelevision subscriber and display each re-created image frame on atelevision set of the cable television subscriber.
 58. Method accordingto claim 57 wherein the data is transmitted via satellite to a receptionsite then retransmitted at the reception site over a cable televisiondistribution network to the cable television subscriber.
 59. Methodaccording to claim 54 wherein the data is transmitted via satellitedirectly to a pay television subscriber further comprising the stepsof:providing another substantially identical tree search vectorquantization codebook at a locale of the pay television subscriber;receiving each transmitted indication at the locale of the paytelevision subscriber, obtaining the address therefrom, and retrievingfrom the codebook at the locale of the pay television subscriber thecodevector residing at the obtained address to reproduce at least asubstantial representation of the finally selected codevector; employingeach reproduced finally selected codevector to substantially re-createeach image frame at the locale of the pay television subscriber anddisplay each re-created image frame on a television set of the paytelevision subscriber.
 60. Method according to claim 54 wherein the datais transmitted via satellite to a reception site and the following stepsare performed at the reception site:providing another substantiallyidentical tree search vector quantization codebook at a locale of thereception site; receiving each transmitted indication at the locale ofthe reception site, obtaining the address therefrom, and retrieving fromthe codebook at the locale of the reception site the codevectorassociated with the obtained address to reproduce at least a substantialrepresentation of the finally selected codevector to reproduce at leasta substantial representation of the finally selected codevector;employing each reproduced finally selected codevector to substantiallyre-create each image frame at the locale of the reception site andencoding data for each re-created image frame in NTSC format;transmitting the NTSC encoded data from the reception site to aplurality of cable television subscribers over a cable televisiondistribution network.
 61. In a cable television system, a method ofcommunicating temporally spaced image frames representing moving imagesto be displayed on a subscriber set, each image frame comprising amatrix of pixels and each pixel within each image frame having at leastan associated intensity value, the method comprising the steps of:a)digitizing the intensity values for the pixels within each image frameand formatting the digital intensity values corresponding to arectangular block of pixels within the image frame to amulti-dimensional input vector; b) processing the input vector; c)providing, in a memory located at a transmitter location of cabletelevision signals, a first tree-search vector quantization codebookhaving plural levels of codevectors each representative of a possibleprocessed vector for converting each processed vector to a memoryaddress associated with each codevector, the codevectors at eachsuccessive level representing possible processed vectors in greaterdetail than codevectors at a preceding level; d) selecting an initiallevel in the codebook; e) comparing each processed vector to thecodevectors at the selected level and selecting the codevector at theselected level that most closely resembles the processed vector; f)calculating a measure of difference, if any, between the selectedcodevector and the processed vector, and comparing the measure ofdifference to a threshold value; g) selecting the next level in thecodebook if the measure of difference exceeds the threshold value andrepeating steps (e) and (f) until either (1) the measure of differencedoes not exceed the threshold value, or (2) a last level of the codebookhas been reached, to obtain a finally selected codevector; h)temporarily storing indications of at least addresses associated withfinally selected codevectors, the indications having lengths that arevariable and on average shorter than lengths of the finally selectedcodevectors; i) serially transmitting the stored indications at asubstantially fixed data rate; and, j) automatically adjusting thethreshold value based upon a condition of the stored indications onlyeither (1) between image frames or (2) within image frames to ensurethat storage and subsequent transmission of the indications does notresult in an empty or overflow storage condition as a result of storingvariable length indications and transmitting the same at a fixed datarate.
 62. Method according to claim 61 wherein the indications aretransmitted to a plurality of cable television subscribers, furthercomprising the steps of:k) providing a second tree search vectorquantization codebook at a locale of each cable television subscriber,each second codebook having a structure and content, includingcodevectors, substantially identical to that of the first codebook; l)receiving each transmitted indication at the locale of each cabletelevision subscriber, obtaining the address therefrom, and retrievingfrom the second codebook the codevector residing at the obtained addressto reproduce at least a substantial representation of the finallyselected codevector; m) employing each reproduced finally selectedcodevector to substantially re-create each image frame at the locale ofeach cable television subscriber and display each re-created image frameon a television set of each cable television subscriber.
 63. Methodaccording to claim 62 wherein step (b) comprises determining a meanvalue of each input vector and removing the mean value from each inputvector to obtain a residual vector, and the residual vector is employedin carrying out steps (e) and (f), and step (i) further comprisestransmitting an indication of the mean value.
 64. Method according toclaim 63 wherein the reproduced finally selected codevector is areproduced residual vector and step (1) further comprises receiving thetransmitted indication of the mean value and combining the receivedindication of mean value and reproduced residual vector to substantiallyreproduce a representation of the input vector.
 65. Method according toclaim 61 wherein the images are color images and each pixel further hasassociated color data, and step (a) further comprises digitizing thecolor data for the pixels within each image frame and formatting thedigital color data corresponding to the rectangular block of pixelswithin the image frame to another multi-dimensional input vector. 66.Method according to claim 61 wherein the memory addresses have avariable length wherein the length increases with each successive levelof codevectors, the transmitted indication identifying the variablelength address of a finally selected codevector and the level of thefinally selected codevector.
 67. Method according to claim 61 wherein acompression code is assigned to each possible address, each compressioncode having a length that is substantially inversely proportional to apredetermined probability that a particular codevector will be finallyselected, the transmitted indication comprising the compression code forthe address associated with the finally selected codevector.
 68. Methodaccording to claim 61 wherein the step (h) comprises temporarily storingthe indications in a buffer and maintaining a measure of unused buffercapacity, and wherein the condition of the stored indications employedto adjust the threshold value is the measure of unused buffer capacity.69. Data compression apparatus comprising:a) first means for receiving amulti-dimensional vector representative of a block of data to becompressed; b) a tree search vector quantization codebook having plurallevels of codevectors, each codevector being representative of apossible vector and the codevectors at each successive levelrepresenting possible vectors in greater detail than codevectors at apreceding level, each codevector having a unique address associatedtherewith; c) a controller for selecting one of the codevectors in thecodebook based upon the vector and a measure of difference between thevector and a threshold value; and, d) second means for transmitting dataindicative of the address of the selected codevector.
 70. Apparatusaccording to claim 69 further comprising third means for temporarilystoring data to be transmitted and for periodically adjusting thethreshold value based upon a measure of unused capacity of the thirdmeans.
 71. Apparatus according to claim 69 further comprising calculatormeans for determining a mean value of the vector and for removing themean value from the vector to obtain a residual vector, the controlleremploying the residual vector to select the codevector, the second meansfurther transmitting data indicative of the mean value.
 72. Apparatusaccording to claim 70 further comprising a lossless compression encoderfor assigning a compression code to the address of the selectedcodevector, the compression code having a length that is substantiallyinversely proportional to a probability that the selected address wouldactually be selected, the transmitted data comprising the compressioncode.
 73. Apparatus according to claim 70 further comprising a feedbackloop coupling the third means to the controller for supplying thethreshold value.
 74. Apparatus according to claim 70 wherein the dataindicative of the selected address has variable length and wherein thethird means comprises a first-in first-out (FIFO) buffer and furtherwherein the data indicative of the selected address is transmitted froman output of the FIFO at a fixed data rate.
 75. Apparatus according toclaim 69 wherein the data compression apparatus is embodied as a portionof a pay television encoder.
 76. A decoder for use by subscribers of apay television system employing, at an encoding site, a tree searchvector quantization data compressor for compressing digital dataindicative of at least intensity values of pixels of images to betransmitted to the subscribers by converting input vectors indicative ofa block of pixels to addresses of a first codebook in the compressor,the first codebook having plural levels of codevectors representative ofpossible input vectors and each successive level representingcodevectors with a greater accuracy than a preceding level ofcodevectors, the encoding site transmitting data indicative of addressesof codevectors found to most closely approximate input vectors, thedecoder comprising:a) a second codebook being substantially identical incontent to the first codebook; b) first means for receiving thetransmitted data and for providing the received data in a form suitablefor addressing the second codebook at an output thereof; c) second meansfor selecting codevectors from the second codebook based upon the outputof the first means; and, d) third means for converting the selectedcodevectors to NTSC image data and for providing the NTSC image data atan output thereof for substantially reproducing an image input to theencoding site.
 77. Method according to claim 1, 11, 31, 52 or 61 whereinthe codevectors are transformed to a transform domain before beingprovided in the codebook, and the codevectors are stored in the codebookin the transform domain, and wherein each input vector is transformed tothe transform domain for selecting one of the codevectors from thecodebook.
 78. Method according to claim 77 wherein the transform domainis the frequency domain and the codevectors and input vectors aretransformed to the frequency domain by a Fourier transform.
 79. Methodaccording to claim 11 or 31 wherein the input data comprises imageframes and the indications are transmitted at a substantially fixedrate, further comprising the step of selecting a value for the thresholdthat causes a predetermined number of image frames to produce just asufficient number of indications to yield the fixed rate over thepredetermined number of frames.
 80. Method according to claim 52 whereinthe image data is in the form of image frames, further comprising thestep of selecting a value for the threshold that causes a predeterminednumber of image frames to produce just a sufficient amount of compresseddata to yield the fixed rate over the predetermined number of frames.81. Method according to claim 61 further comprising the step ofselecting a value for the threshold that causes a predetermined numberof image frames to produce just a sufficient number of indications toyield the fixed rate over the predetermined number of frames. 82.Apparatus according to claim 69 wherein the input data comprises imageframes and the indications are transmitted via the second means at asubstantially fixed rate and wherein the threshold value has a magnitudethat causes a predetermined number of image frames to produce just asufficient number of indications to yield the fixed rate over thepredetermined number of frames.